package com.p2p.trans.client.model;

import java.sql.Timestamp;
import java.util.Date;

import com.p2p.base.model.Money;

/**
 * Created by dudu on 14-7-15.
 */
public class AccountVO {
    private String accountNo;

    private String userId;
    
    private Long createOperator;
    
    private String lastModifiedOperator;
    
    private Integer accountType;
    
    private String currency;
    private Money balance = new Money(0,0);
    private Money creditAmount = new Money(0,0);
    private Money freezeAmount = new Money(0,0);
    private Date lastModifiedDt;

    private String enabledStatus;
    private Date createDt;
    private Integer repeatPasswordErrorTimes;

    private Long customerId;
    private String aliasName;
    private String accountTitle;

    private String balanceDirection;

    private Money depositAmount = new Money(0,0);

    private Money ctuAmount = new Money(0,0);
    private Money systemAmount = new Money(0,0);

    private Money canUserBalance = new Money(0,0);
   
    public String getAccountNo() {
        return accountNo;
    }

    public void setAccountNo(String accountNo) {
        this.accountNo = accountNo;
    }

    

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    

    public Long getCreateOperator() {
        return createOperator;
    }

    public void setCreateOperator(Long createOperator) {
        this.createOperator = createOperator;
    }

    

    public String getLastModifiedOperator() {
        return lastModifiedOperator;
    }

    public void setLastModifiedOperator(String lastModifiedOperator) {
        this.lastModifiedOperator = lastModifiedOperator;
    }

    

    public Integer getAccountType() {
        return accountType;
    }

    public void setAccountType(Integer accountType) {
        this.accountType = accountType;
    }

   

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }
    

    public Money getBalance() {
        return balance;
    }

    public void setBalance(Money balance) {
        this.balance = balance;
    }
    

    public Money getCreditAmount() {
        return creditAmount;
    }

    public void setCreditAmount(Money creditAmount) {
        this.creditAmount = creditAmount;
    }
    

    public Money getFreezeAmount() {
        return freezeAmount;
    }

    public void setFreezeAmount(Money freezeAmount) {
        this.freezeAmount = freezeAmount;
    }
   
    public Date getLastModifiedDt() {
        return lastModifiedDt;
    }

    public void setLastModifiedDt(Date lastModifiedDt) {
        this.lastModifiedDt = lastModifiedDt;
    }
  

    public String getEnabledStatus() {
        return enabledStatus;
    }

    public void setEnabledStatus(String enabledStatus) {
        this.enabledStatus = enabledStatus;
    }
   

    public Date getCreateDt() {
        return createDt;
    }

    public void setCreateDt(Date createDt) {
        this.createDt = createDt;
    }
   
    public Integer getRepeatPasswordErrorTimes() {
        return repeatPasswordErrorTimes;
    }

    public void setRepeatPasswordErrorTimes(Integer repeatPasswordErrorTimes) {
        this.repeatPasswordErrorTimes = repeatPasswordErrorTimes;
    }
    

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }
 

    public String getAliasName() {
        return aliasName;
    }

    public void setAliasName(String aliasName) {
        this.aliasName = aliasName;
    }
   
    public String getAccountTitle() {
        return accountTitle;
    }

    public void setAccountTitle(String accountTitle) {
        this.accountTitle = accountTitle;
    }
    
    public String getBalanceDirection() {
        return balanceDirection;
    }

    public void setBalanceDirection(String balanceDirection) {
        this.balanceDirection = balanceDirection;
    }
  
    public Money getDepositAmount() {
        return depositAmount;
    }

    public void setDepositAmount(Money depositAmount) {
        this.depositAmount = depositAmount;
    }
   

    public Money getCtuAmount() {
        return ctuAmount;
    }

    public void setCtuAmount(Money ctuAmount) {
        this.ctuAmount = ctuAmount;
    }
    
    public Money getSystemAmount() {
        return systemAmount;
    }

    public void setSystemAmount(Money systemAmount) {
        this.systemAmount = systemAmount;
    }

    public Money getCanUserBalance() {
		return canUserBalance;
	}

	public void setCanUserBalance(Money canUserBalance) {
		this.canUserBalance = canUserBalance;
	}

	public void initCanUserBalance(){
		Long cent = this.balance.getCent()-this.freezeAmount.getCent();
    	this.canUserBalance.setCent(cent);
    }

	@Override
	public String toString() {
		return "AccountVO [accountNo=" + accountNo + ", userId=" + userId
				+ ", createOperator=" + createOperator
				+ ", lastModifiedOperator=" + lastModifiedOperator
				+ ", accountType=" + accountType + ", currency=" + currency
				+ ", balance=" + balance + ", creditAmount=" + creditAmount
				+ ", freezeAmount=" + freezeAmount + ", lastModifiedDt="
				+ lastModifiedDt + ", enabledStatus=" + enabledStatus
				+ ", createDt=" + createDt + ", repeatPasswordErrorTimes="
				+ repeatPasswordErrorTimes + ", customerId=" + customerId
				+ ", aliasName=" + aliasName + ", accountTitle=" + accountTitle
				+ ", balanceDirection=" + balanceDirection + ", depositAmount="
				+ depositAmount + ", ctuAmount=" + ctuAmount
				+ ", systemAmount=" + systemAmount + ", canUserBalance="
				+ canUserBalance + "]";
	}
   
}
